using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

using MicroFractal.iTunesBrowser.Core.Helper;

namespace MicroFractal.iTunesBrowser.Core.Data.ITunesDB.ItemList
{
    public class ItemList : Header.Header
    {

        #region Constructors

        public ItemList():base()
        {
            _items = new List<MicroFractal.iTunesBrowser.Core.Data.ITunesDB.Item.DataItem>();
        }

        public ItemList(MemoryStream data)
            : base(data)
        {
            _count = Helper.ITunesHelper.BytesToInt(data, 8, 4);
        }

        #endregion

        #region Properties

        private int _count;

        public int Count
        {
            get { return _count; }
            set { _count = value; }
        }

        private List<Item.DataItem> _items;

        public List<Item.DataItem> Items
        {
            get { return _items; }
            set { _items = value; }
        }
	
        #endregion
    }
}
